
<%@page import="shmged.com.shlcm.reimbursement.CmCreateReimbursementEntry"%>
<%@page import="shmged.com.shlcm.utils.CmCreateDocHelper"%><%@ page language="java" contentType="utf-8" pageEncoding="utf-8"%>
    <%@page import="java.util.*"%>
    <%@page import="java.io.OutputStream"%>
  <%@page import="org.apache.poi.hssf.usermodel.HSSFWorkbook" %> 
  <%@page import="java.io.File"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.io.OutputStream"%>
<%@page import="java.net.URLEncoder"%>
<%@page import="wt.util.WTProperties"%> 
<%   

String oids=request.getParameter("oids");
String path=CmCreateReimbursementEntry.getSecendFilesToZip(oids);

	File file = new File(path);
	FileInputStream in = new FileInputStream(file);
	java.util.Date curTime = new java.util.Date();
	String exportFileName =file.getName();
	exportFileName = URLEncoder.encode(exportFileName,"UTF-8");
	response.reset();
	response.setHeader("Content-disposition", "attachment; filename=" + exportFileName + "\";");
	  out.clear();
	  out = pageContext.pushBody();
	  OutputStream os = response.getOutputStream();
	  //out.clear();
	  int c;
			while((c=in.read())!=-1)
			{ 
				os.write(c);
			}
	  os.flush();
	  os.close();
	  out = pageContext.pushBody();
  
 
  
%>  



